package com.zc.trendsDispatch.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zc.trendsDispatch.mapper.ChargeStationRealPowerHisMapper;
import com.zc.trendsDispatch.domain.ChargeStationRealPowerHis;
import com.zc.trendsDispatch.service.IChargeStationRealPowerHisService;

/**
 * 场站历史功率Service业务层处理
 *
 * @author glb
 * @date 2023-12-14
 */
@Service
public class ChargeStationRealPowerHisServiceImpl implements IChargeStationRealPowerHisService
{
    @Autowired
    private ChargeStationRealPowerHisMapper chargeStationRealPowerHisMapper;

    /**
     * 查询场站历史功率
     *
     * @param chargeStationId 场站历史功率主键
     * @return 场站历史功率
     */
    @Override
    public ChargeStationRealPowerHis selectChargeStationRealPowerHisByChargeStationId(Long chargeStationId)
    {
        return chargeStationRealPowerHisMapper.selectChargeStationRealPowerHisByChargeStationId(chargeStationId);
    }

    /**
     * 查询场站历史功率列表
     *
     * @param chargeStationRealPowerHis 场站历史功率
     * @return 场站历史功率
     */
    @Override
    public List<ChargeStationRealPowerHis> selectChargeStationRealPowerHisList(ChargeStationRealPowerHis chargeStationRealPowerHis)
    {
        return chargeStationRealPowerHisMapper.selectChargeStationRealPowerHisList(chargeStationRealPowerHis);
    }

    /**
     * 新增场站历史功率
     *
     * @param chargeStationRealPowerHis 场站历史功率
     * @return 结果
     */
    @Override
    public int insertChargeStationRealPowerHis(ChargeStationRealPowerHis chargeStationRealPowerHis)
    {
        return chargeStationRealPowerHisMapper.insertChargeStationRealPowerHis(chargeStationRealPowerHis);
    }

    /**
     * 修改场站历史功率
     *
     * @param chargeStationRealPowerHis 场站历史功率
     * @return 结果
     */
    @Override
    public int updateChargeStationRealPowerHis(ChargeStationRealPowerHis chargeStationRealPowerHis)
    {
        chargeStationRealPowerHis.setUpdateTime(DateUtils.getNowDate());
        return chargeStationRealPowerHisMapper.updateChargeStationRealPowerHis(chargeStationRealPowerHis);
    }

    /**
     * 批量删除场站历史功率
     *
     * @param chargeStationIds 需要删除的场站历史功率主键
     * @return 结果
     */
    @Override
    public int deleteChargeStationRealPowerHisByChargeStationIds(Long[] chargeStationIds)
    {
        return chargeStationRealPowerHisMapper.deleteChargeStationRealPowerHisByChargeStationIds(chargeStationIds);
    }

    /**
     * 删除场站历史功率信息
     *
     * @param chargeStationId 场站历史功率主键
     * @return 结果
     */
    @Override
    public int deleteChargeStationRealPowerHisByChargeStationId(Long chargeStationId)
    {
        return chargeStationRealPowerHisMapper.deleteChargeStationRealPowerHisByChargeStationId(chargeStationId);
    }
}
